#include <iostream>
#include <list>
using namespace std;

void show_list(list<int> L)
{ list<int>::iterator p;
  for(p=L.begin(); p!=L.end(); p++)
    cout << *p << " ";
  cout << endl;
}    

int main()
{ int a[10]={45,34,50,23,77,12,15,65,70,35}; 
  list<int> L(a,a+10); 

  cout << "L: "; show_list(L);
  L.sort();  
  cout << "L: "; show_list(L);

  return 0;
}    
